Skip to content

Conversation

@Cmdv
Copy link
Contributor

@Cmdv Cmdv commented Oct 23, 2025

Description

this fixes #2007

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with fourmolu on version 0.10.1.0 (which can be run with scripts/fourmolize.sh)
  • Self-reviewed the diff

@Cmdv Cmdv requested a review from a team October 23, 2025 11:41
@Cmdv Cmdv requested a review from a team as a code owner October 23, 2025 11:41
@Cmdv Cmdv force-pushed the 2007-rollback-drep_distr branch 2 times, most recently from 297586b to ad5ea9b Compare October 28, 2025 12:51
@Cmdv Cmdv force-pushed the 2007-rollback-drep_distr branch 2 times, most recently from e7f56b3 to a1a5e2f Compare October 29, 2025 12:12
, " WHERE block_no = $1"
[ "SELECT curr.id, prev.epoch_no"
, " FROM " <> tableName (Proxy @a) <> " curr"
, " JOIN " <> tableName (Proxy @a) <> " prev ON prev.block_no = $1 - 1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this join ever fail, ie having no prev? For example could this query be called when rolling back to genesis?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question, It would fail if it rolled back to the first block in genesis as it doesn't have a previous block. Do we ever do that?

@kderme kderme merged commit 4ddefc1 into master Nov 6, 2025
8 of 75 checks passed
@Cmdv Cmdv mentioned this pull request Nov 11, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ServerError "23505" "duplicate key value violates unique constraint "unique_drep_distr"

3 participants